<template>
  <div
    v-if="crud.props.searchToggle"
  >
    <!--<el-select
      v-model="query.recognizeType"
      clearable
      size="small"
      placeholder="认证类型"
      class="filter-item"
      style="width: 200px"
      @change="crud.toQuery"
    >
      <el-option
        v-for="item in specializedList"
        :key="item.label"
        :label="item.label"
        :value="item.label"
      />
    </el-select>-->
    <el-input v-model="query.enterpriseName" clearable size="small" placeholder="请输入企业名称" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
    <el-date-picker v-model="query.recognizeYear" clearable size="small" type="year" placeholder="请选择认证年份" value-format="yyyy" style="width: 200px;" class="filter-item" @change="crud.toQuery"></el-date-picker>
    <rrOperation />
    <!-- <el-button class="filter-item" size="mini" type="primary" icon="el-icon-download" @click="exportData"  >导出</el-button> -->

  </div>
</template>

<script>
import { header } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import {specializedList} from '@/utils/index.js'

export default {
  components: { rrOperation },
  mixins: [header()],
  props: {
    permission: {
      type: Object,
      required: true
    }
  },
  data() {
    return {
      specializedList
    }
  },
  created() {
    // const obj = {
    //   recognizeType: '全部'
    // }
    // this.crud.query = obj
    // this.crud.query.recognizeType = '全部'
    // console.log(this.crud.query.recognizeType, 'recognizeType')
  },
  methods: {
    // exportData() {
    //   downloadTheFile(`/business/excel/exportHouse`, '重点企业信息.xlsx', this.query)
    // }
  },
  watch: {
    'query.recognizeType': (newVal, oldVal) => {
      console.log(newVal, oldVal)
    },
  },
}
</script>

<style>
.el-radio-button__inner{
  font-weight: bold;
}
</style>